//
//  ItemDBTools.h
//  NC-Trendy
//
//  Created by LeungChaos on 16/2/26.
//  Copyright © 2016年 liang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CoreItem.h"
#import "NCItem.h"
@interface ItemDBTools : NSObject
/**
 * 查找本地数据库 返回下拉刷新数据
 **/
+ (NSMutableArray<CoreItem*> *)itemArrayWithType:(NSString *)type withMin_id:(NSString *)min_id errorInfo:(void(^)(NSError *error))errorBlock;
/**
 * 保存item到本地数据库
 **/
+ (void)insertCoreItemWithItem:(NCItem *)item errorInfo:(void(^)(NSError *error))errorBlock;
/**
 * 删除所有item
 **/
+ (void)deleteAllCoreItemWithErrorInfo:(void(^)(NSError *error))errorBlock;
/**
 * 直接转换成ncitem的实例对象
 **/
+ (NCItem *)ncItemWithCoreItem:(CoreItem *)cItem;

@end
